package com.cs171.market.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author yangyifei
 * @version 1.0
 * @date 2020/6/21 11:38
 */
@Configuration
public class FileConfig extends WebMvcConfigurationSupport {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/tmp_uploads/**").addResourceLocations("file:C://tmp//");
        super.addResourceHandlers(registry);
    }


}
